package com.foreverwin.mes.lims.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.foreverwin.mes.lims.dto.InspectTaskDto;
import com.foreverwin.mes.lims.model.InspectPlanDetail;
import com.foreverwin.mes.lims.model.InspectTask;
import com.baomidou.mybatisplus.service.IService;
import com.foreverwin.mes.core.base.FrontPage;
import com.foreverwin.mes.lims.vo.InspectTaskVo;
import com.foreverwin.mes.meapi.model.Resrce;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Levy
 * @since 2020-02-24
 */
public interface InspectTaskService extends IService<InspectTask> {

    /**
     *  分页查询
     * @param frontPage
     * @return
     */
    Page<InspectTask> selectPage(FrontPage<InspectTask> frontPage, InspectTask inspectTask);

    List<InspectTask> selectList(InspectTask inspectTask);

    /**
     * 手动维护任务
     * @param inspectTaskVo
     */
    public void doSave( InspectTaskVo  inspectTaskVo );

    /**
     * 查找待办事项
     * @param object
     * @param workCenter
     * @param resrce
     * @param site
     * @return
     */
    public List<InspectTaskDto> doSearch(String object, String workCenter, String resrce, String site, String user);

    /**
     * 自动创建任务
     * @param inspectPlanDetails
     * @param site
     * @param user
     */
    public void autoCreatedTask( List<InspectPlanDetail> inspectPlanDetails ,String site , String user );


    /**
     * 根据设备查找正在做的工单
     * @param resrce
     * @return
     */
    public Map doSearchItemByResrce( Resrce resrce );

    /**
     * 自动创建设备外教任务
     * @param inspectPlanDetails
     * @param site
     * @param user
     */
    public void autoCreatedOSTask( List<InspectPlanDetail> inspectPlanDetails ,String site , String user );
}